package calender;/**
 * @Author wxc
 * @Date 2021/4/22 10:53
 */

import utils.DateUtils;

import java.util.ArrayList;
import java.util.Date;

/**
 * @author wxc
 * @date 2021年04月22日 10:53
 */
public class DateDemo {
    public static void main(String[] args) {
        Date date = new Date();
        String toString = DateUtils.formatDateToString(date, "yyyy-MM-dd HH:mm:ss");
        System.out.println(toString);
        String dateString="2021-04-22 10:09:26";
        Date date1 = DateUtils.formatStringToDate(toString, "yyyy-MM-dd HH:mm:ss");
        boolean before = date1.before(date);
        boolean before1 = date.before(date1);
        System.out.println(before);
        System.out.println(before1);

        ArrayList<Object> list = new ArrayList<>();
    }
}
